package main

import (
	"fmt"
	"github.com/gin-gonic/gin"

	"github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
	"manhe/controller"
	_ "manhe/docs"
	"manhe/middleware"
	"manhe/tool"
)

// @title 盲盒产品的API接口文档
// @description 盲盒api
// @contact.name 谢浩  13203115670
// @host 127.0.0.1:8080

func main() {

	r := gin.Default()

	r.Use(middleware.Core())
	r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
	registerRouter(r)
	fmt.Println("启动了")
	fmt.Println(tool.CONFIG.Log.LogFile)

	r.Run()
}
func registerRouter(router *gin.Engine) {
	new(controller.UserController).Router(router)
	new(controller.BindBoxController).Router(router)
	new(controller.OrderController).Router(router)
}
